package com.onesports.intelligent.k12.polarlight.controller.common;


import cn.oneframework.common.applications.Result;
import com.onesports.intelligent.k12.polarlight.domain.dto.login.LoginDTO;
import com.onesports.intelligent.k12.polarlight.security.LoginSuccessHandler;
import com.onesports.intelligent.k12.polarlight.security.wx.WxLoginDTO;
import com.onesports.intelligent.k12.polarlight.security.wx.WxLoginSuccessHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author
 * @description: SysLoginController
 * @date 2021年10月11日 11:00
 */
@RestController
@RequestMapping("/auth")
@Api(tags = "Login:")
@RequiredArgsConstructor
public class SysLoginController {

    @PostMapping("/login")
    @ApiOperation(value = "用户密码登录")
    public ResponseEntity<LoginSuccessHandler.LoginVO> login(@Validated @RequestBody LoginDTO loginDTO) {
        System.out.print("登录接口的Swagger说明，无实际用途!");
        return null;
    }

    @PostMapping("/wx/login")
    @ApiOperation(value = "微信授权登录")
    public ResponseEntity<WxLoginSuccessHandler.LoginVO> login(@Validated @RequestBody WxLoginDTO loginDTO) {
        System.out.print("登录接口的Swagger说明，无实际用途!");
        return null;
    }

    @PostMapping("/logout")
    @ApiOperation(value = "登出")
    public ResponseEntity<Result> logout() {
        System.out.print("登录接口的Swagger说明，无实际用途!");
        return null;
    }
}
